package com.gcu.admin.listener;

import com.gcu.admin.service.ISysPermissionService;
import lombok.AllArgsConstructor;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * @ system:Mac
 * @ author:lin tingfeng
 * @ data:2023/9/27 16:05
 * @ package_name:com.gcu.admin.listener
 * @ project_name:SpringCloud-Oauth2
 * @ desc: 初始化权限缓存监听器
 */
@Component
@AllArgsConstructor
public class InitResourcePermissionCache implements CommandLineRunner {

    private ISysPermissionService iSysPermissionService;

    @Override
    public void run(String... args) {
        iSysPermissionService.refreshPermRolesRules();
    }
}
